Hệ thống quản lý ISP trong PHP

1 <?php
2     require_once
"includes/headx.php";
3     
if (!isset($_SESSION['admin_session']) )
4     {
5         $commons->redirectTo(SITE_PATH.
'login.php');
6     }
7     require_once
"includes/classes/admin-class.php";
8     $admins =
new Admins($dbh);
9     $id = isset($_GET[
'customer' ])?$_GET[ 'customer' ]:'';
10     ?>
11 <!doctype html>
12 <html lang=
"en" class="no-js">
13 <head>
14     <meta charset=
" utf-8">
15     <meta name=
"viewport" content="width=device-width, initial-scale=1">
16     <link href=
'https://fonts.googleapis.com/css?family=Open+Sans:300,400,700' rel='stylesheet' type='text/css'>
17     <link rel=
"stylesheet" href="component/css/bootstrap.css"> <!-- CSS bootstrap -->
18     <link rel=
"stylesheet" href="component/css/style.css"> <!-- Resource style -->
19     <link rel=
"stylesheet" href="component/css/reset.css"> <!-- Resource style -->
20     <link rel=
"stylesheet" href="component/css/invoice.css"> <!-- CSS bootstrap -->
21     <script src=
"component/js/modernizr.js"></script> <!-- Modernizr -->
22     <title>Invoice | Netway</title>
23 </head>
24 <body>
25 <div
class="container">
26         <?php
27             $info = $admins->getCustomerInfo($id);
28             
if (isset($info) && sizeof($info) > 0) {
29             $package_id = $info->package_id;
30             $packageInfo = $admins->getPackageInfo($package_id);
31         ?>
32     <div
class="row">
33         <div
class="brand"><img src="component/img/logo.png" alt=""></div>
34         <div
class="pull-right">Date: <?=date("jS F y")?></div><br>
35         <div
class="em"><b>Name : </b> <em><?=$info->full_name?></em></div>
36         <div
class="em"><b>Address:</b> <em><?=$info->address ?></em></div>
37         <div
class="em"><b>Contact :</b> <em><?=$info->contact ?></em> </div>
38         <div
class="em"><b>Package:</b> <em><?=$packageInfo->name?></em> </div>
39         <div
class="em"><b>IP address:</b> <em><?=$info->ip_address?></em></div>
40         <span
class="message pull-right">Last payment date : <?=date("jS F y",strtotime("+7 day"))?></span>
41     </div>
42         <?php } ?>
43     <div
class=" row">
44         <table
class="table table-striped table-bordered">
45             <thead
class="thead-inverse">
46                 <tr>
47                     <th>SL </th>
48                     <th>Month</th>
49                     <th>Amount</th>
50                 </tr>
51             </thead>
52             <tbody>
53             <?php
54                 $bills = $admins->fetchindIvidualBill($id);
55                 $total =
0;
56                 
if (isset($bills) && sizeof($bills) > 0){
57                     
foreach ($bills as $bill){
58                         $total += $bill->amount;
59                         ?>
60                     <tr>
61                         <td><?=$bill->id?></td>
62                         <td><?=$bill->r_month?></td>
63                         <td><?=$bill->amount?></td>
64                     </tr>
65                 <?php } ?>
66             </tbody>
67             <tfoot>
68                 <tr>
69                     <th colspan=
"2"> Net Total</th>
70                     <th><?=$total?></th>
71                 </tr>
72                 <tr>
73                     <th>In Words</td>
74                     <th colspan=
"2"><?=getToText($total)?> Only.</th>
75                 </tr>
76             </tfoot>
77             <?php
78                 } ?>
79         </table>
80     </div>
81     <div
class="message">Internet bill must be paid before last payment date.</div>
82     <div
class="printbutton hide-on-small-only pull-left"><a href="#" onClick="javascript:window.print()">Print</a></div>
83     <div
class="sign pull-right">Authorized Signature</div>
84 </div>
85 </body>
86 <?php include
'includes/footer.php'; ?>


Gõ tìm kiếm nhanh...